package com.lhh.springcloud.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 李洪豪
 * @Sno 20220301044
 */
@Configuration
public class RibbonRule {
    @Bean
    public IRule myRule() {
        return new RandomRule();//负载均衡，随机调度算法
    }
}
